import { Component, Input, OnInit, TemplateRef, ViewChild,Output,EventEmitter, ChangeDetectionStrategy } from '@angular/core';
// import * as EventEmitter from 'events';

@Component({
  selector: 'app-wy-carousel',
  templateUrl: './wy-carousel.component.html',
  styleUrls: ['./wy-carousel.component.less'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class WyCarouselComponent implements OnInit {
  @Input() activeIndex = 0;

  @Output() changeSlide = new EventEmitter<"pre" | "next">();

  @ViewChild('dot',{static:true}) dotRef: TemplateRef<any> | undefined;
  
  constructor() { }

  ngOnInit(): void {
  }
  onChangeSlide(type:"pre" | "next"){
    this.changeSlide.emit(type)
  }
}
